package com.code9xs.mapper;

import com.code9xs.pojo.Activity;
import com.code9xs.pojo.Article;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ActivityMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Activity record);

    int insertSelective(Activity record);

    Activity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Activity record);

    int updateByPrimaryKeyWithBLOBs(Activity record);

    int updateByPrimaryKey(Activity record);

    List<Activity> selectFiveImgByTime();

    /**
     * 获取社团所有活动
     * @param aid
     * @return
     */
    List<Activity> selectAssociationActivityPagination(@Param("aid") Integer aid, @Param("start") Integer start, @Param("size") Integer size);

    int selectAllCountByAid(@Param("aid") Integer aid);

    List<Activity> selectNewActivity();
}